package com.venn.controller;

import com.venn.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpSession;

/**
 * Created by Venn on 2017/8/15.
 */
@Controller
@RequestMapping("/admin")
public class AdminController {

    @RequestMapping("/main")
    public ModelAndView main(HttpSession session){
        ModelAndView mv = new ModelAndView("/admin/main");
        User user = (User)session.getAttribute("user");
        mv.addObject("user",user);
        return mv;
    }


}
